home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / tthtml.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  8KB  |  270 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  3. <MODE>
  4.     <!--
  5.         Edit mode for the Perl Template Toolkit
  6.         http://template-toolkit.org/index.html
  7.         Made by Krassimir Berov: k.berov@gmail.com
  8.     -->
  9.     <PROPS>
  10.         <PROPERTY NAME="commentStart" VALUE="<!--" />
  11.         <PROPERTY NAME="commentEnd" VALUE="-->" />
  12.         <PROPERTY NAME="lineComment" VALUE="#" />
  13.         <PROPERTY NAME="wordBreakChars" VALUE=",+-=<>/?^&*" />
  14.  
  15.         <!-- Auto indent -->
  16.         <PROPERTY NAME="indentOpenBrackets" VALUE="{" />
  17.         <PROPERTY NAME="indentCloseBrackets" VALUE="}" />
  18.         <PROPERTY NAME="indentOpenBrackets" VALUE="[" />
  19.         <PROPERTY NAME="indentCloseBrackets" VALUE="]" />
  20.         <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
  21.         <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
  22.         <PROPERTY NAME="lineUpClosingBracket" VALUE="true" />
  23.         <PROPERTY NAME="indentNextLine" VALUE="(FOREACH|FOR|WHILE|IF|ELSIF|ELSE|UNLESS|SWITCH|CASE|TRY|CATCH)(\s.*?)?;" />
  24.     </PROPS>
  25.  
  26.     <!-- ESCAPE is not exactly right but it is needed to correctly
  27.          handle JavaScript in on* parameters -->
  28.     <RULES SET="TAGS" DEFAULT="MARKUP">
  29.         <SPAN TYPE="LITERAL1" ESCAPE="\">
  30.             <BEGIN>"</BEGIN>
  31.             <END>"</END>
  32.         </SPAN>
  33.  
  34.         <SPAN TYPE="LITERAL1" ESCAPE="\">
  35.             <BEGIN>'</BEGIN>
  36.             <END>'</END>
  37.         </SPAN>
  38.         <SEQ TYPE="OPERATOR">=</SEQ><!-- give priority to TT -->
  39.  
  40.     </RULES>
  41.  
  42.     <RULES SET="JAVASCRIPT" DEFAULT="MARKUP" IGNORE_CASE="TRUE">
  43.         <SEQ TYPE="MARKUP" DELEGATE="javascript::MAIN">></SEQ>
  44.         <!-- handle <SCRIPT SRC="..."> properly -->
  45.         <SEQ TYPE="MARKUP" DELEGATE="html::MAIN">SRC=</SEQ>
  46.     </RULES>
  47.  
  48.     <RULES SET="CSS" DEFAULT="MARKUP">
  49.         <SEQ TYPE="MARKUP" DELEGATE="css::MAIN">></SEQ>
  50.     </RULES>
  51.     <RULES IGNORE_CASE="TRUE">
  52.         <!-- SGML comment -->
  53.         <SPAN TYPE="COMMENT1">
  54.             <BEGIN><!--</BEGIN>
  55.             <END>--></END>
  56.         </SPAN>
  57.  
  58.         <!-- JavaScript -->
  59.         <SPAN TYPE="MARKUP" DELEGATE="JAVASCRIPT">
  60.             <BEGIN><SCRIPT</BEGIN>
  61.             <END></SCRIPT></END>
  62.         </SPAN>
  63.  
  64.         <!-- stylesheet -->
  65.         <SPAN TYPE="MARKUP" DELEGATE="CSS">
  66.             <BEGIN><STYLE</BEGIN>
  67.             <END></STYLE></END>
  68.         </SPAN>
  69.  
  70.         <!-- DTD instructions -->
  71.         <SPAN TYPE="KEYWORD2" DELEGATE="xml::DTD-TAGS">
  72.             <BEGIN><!</BEGIN>
  73.             <END>></END>
  74.         </SPAN>
  75.  
  76.         <!-- markup tags -->
  77.         <SPAN TYPE="MARKUP" DELEGATE="TAGS">
  78.             <BEGIN><</BEGIN>
  79.             <END>></END>
  80.         </SPAN>
  81.  
  82.         <!-- SGML entities -->
  83.         <SPAN TYPE="LITERAL2" NO_WORD_BREAK="TRUE">
  84.             <BEGIN>&</BEGIN>
  85.             <END>;</END>
  86.         </SPAN>
  87.         <SPAN TYPE="COMMENT2">
  88.             <BEGIN>[%#</BEGIN>
  89.             <END>%]</END>
  90.         </SPAN>
  91.         <SPAN_REGEXP DELEGATE="perl::MAIN" HASH_CHAR="[%">
  92.             <BEGIN>\[%\s*?PERL\s*?%\]</BEGIN>
  93.             <END>\[%\s*?END\s*?%\]</END>
  94.         </SPAN_REGEXP>
  95.  
  96.         <SPAN TYPE="LITERAL3" DELEGATE="TT">
  97.             <BEGIN>[%</BEGIN>
  98.             <END>%]</END>
  99.         </SPAN>
  100.     </RULES>
  101.     <RULES SET="TT"
  102.             IGNORE_CASE="FALSE"
  103.             HIGHLIGHT_DIGITS="TRUE"
  104.             DIGIT_RE="(0x[\p{XDigit}]+[lL]?|[\p{Digit}]+(e[\p{Digit}]*)?[lLdDfF]?)">
  105.  
  106.         <!-- example: [% users.${me.id}.name %] -->
  107.         <SPAN TYPE="KEYWORD2" NO_LINE_BREAK="TRUE" DELEGATE="perl::VARIABLE">
  108.             <BEGIN>${</BEGIN>
  109.             <END>}</END>
  110.         </SPAN>
  111.         <!-- Scalar variables -->
  112.         <SEQ_REGEXP HASH_CHAR="$" TYPE="KEYWORD2">\$#?[\w:]+</SEQ_REGEXP>
  113.         <!-- Scalar variables
  114.         <SEQ_REGEXP ->ADD HASH_CHARS here if uncommenting<- TYPE="KEYWORD2">\s[a-z_0-9]+\s</SEQ_REGEXP> -->
  115.         <!-- Compound Variables -->
  116.         <MARK_PREVIOUS TYPE="KEYWORD4" MATCH_TYPE="CONTEXT">.</MARK_PREVIOUS>
  117.         <MARK_PREVIOUS TYPE="FUNCTION" MATCH_TYPE="CONTEXT">(</MARK_PREVIOUS>
  118.         <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
  119.             <BEGIN>"</BEGIN>
  120.             <END>"</END>
  121.         </SPAN>
  122.  
  123.         <SPAN TYPE="LITERAL1" NO_LINE_BREAK="TRUE">
  124.             <BEGIN>'</BEGIN>
  125.             <END>'</END>
  126.         </SPAN>
  127.  
  128.         <SEQ TYPE="OPERATOR">=</SEQ>
  129.         <SEQ TYPE="OPERATOR">!</SEQ>
  130.         <SEQ TYPE="OPERATOR">>=</SEQ>
  131.         <SEQ TYPE="OPERATOR"><=</SEQ>
  132.         <SEQ TYPE="OPERATOR">+</SEQ>
  133.         <SEQ TYPE="OPERATOR">-</SEQ>
  134.         <SEQ TYPE="OPERATOR">/</SEQ>
  135.         <SEQ TYPE="OPERATOR">*</SEQ>
  136.         <SEQ TYPE="OPERATOR">></SEQ>
  137.         <SEQ TYPE="OPERATOR"><</SEQ>
  138.         <SEQ TYPE="OPERATOR">%</SEQ>
  139.         <SEQ TYPE="OPERATOR">&</SEQ>
  140.         <SEQ TYPE="OPERATOR">|</SEQ>
  141.         <SEQ TYPE="OPERATOR">^</SEQ>
  142.         <SEQ TYPE="OPERATOR">~</SEQ>
  143.         <SEQ TYPE="OPERATOR">.</SEQ>
  144.         <SEQ TYPE="OPERATOR">}</SEQ>
  145.         <SEQ TYPE="OPERATOR">{</SEQ>
  146.         <SEQ TYPE="OPERATOR">,</SEQ>
  147.         <SEQ TYPE="OPERATOR">;</SEQ>
  148.         <SEQ TYPE="OPERATOR">]</SEQ>
  149.         <SEQ TYPE="OPERATOR">[</SEQ>
  150.         <SEQ TYPE="OPERATOR">?</SEQ>
  151.         <KEYWORDS>
  152.             <!-- Template directives -->
  153.             <KEYWORD1>SET</KEYWORD1>
  154.             <KEYWORD1>GET</KEYWORD1>
  155.             <KEYWORD1>CALL</KEYWORD1>
  156.             <KEYWORD1>DEFAULT</KEYWORD1>
  157.             <KEYWORD1>IF</KEYWORD1>
  158.             <KEYWORD1>ELSIF</KEYWORD1>
  159.             <KEYWORD1>ELSE</KEYWORD1>
  160.             <KEYWORD1>UNLESS</KEYWORD1>
  161.             <KEYWORD1>LAST</KEYWORD1>
  162.             <KEYWORD1>NEXT</KEYWORD1>
  163.             <KEYWORD1>FOR</KEYWORD1>
  164.             <KEYWORD1>FOREACH</KEYWORD1>
  165.             <KEYWORD1>WHILE</KEYWORD1>
  166.             <KEYWORD1>SWITCH</KEYWORD1>
  167.             <KEYWORD1>CASE</KEYWORD1>
  168.             <KEYWORD1>PROCESS</KEYWORD1>
  169.             <KEYWORD1>INCLUDE</KEYWORD1>
  170.             <KEYWORD1>INSERT</KEYWORD1>
  171.             <KEYWORD1>WRAPPER</KEYWORD1>
  172.             <KEYWORD1>BLOCK</KEYWORD1>
  173.             <KEYWORD1>MACRO</KEYWORD1>
  174.             <KEYWORD1>END</KEYWORD1>
  175.             <KEYWORD1>USE</KEYWORD1>
  176.             <KEYWORD1>IN</KEYWORD1>
  177.             <KEYWORD1>FILTER</KEYWORD1>
  178.             <KEYWORD1>TRY</KEYWORD1>
  179.             <KEYWORD1>THROW</KEYWORD1>
  180.             <KEYWORD1>CATCH</KEYWORD1>
  181.             <KEYWORD1>FINAL</KEYWORD1>
  182.             <KEYWORD1>META</KEYWORD1>
  183.             <KEYWORD1>TAGS</KEYWORD1>
  184.             <KEYWORD1>DEBUG</KEYWORD1>
  185.             <KEYWORD1>PERL</KEYWORD1>
  186.             <!-- Compile Time Constant Folding -->
  187.             <KEYWORD1>constants</KEYWORD1>
  188.             <!-- Special Variables -->
  189.             <KEYWORD2>template</KEYWORD2>
  190.             <KEYWORD2>component</KEYWORD2>
  191.             <KEYWORD2>loop</KEYWORD2>
  192.             <KEYWORD2>error</KEYWORD2>
  193.             <KEYWORD2>content</KEYWORD2>
  194.  
  195.             <!-- VMethods -->
  196.             <!-- Scalar Virtual Methods -->
  197.             <KEYWORD3>defined</KEYWORD3>
  198.             <KEYWORD3>length</KEYWORD3>
  199.             <KEYWORD3>repeat</KEYWORD3>
  200.             <KEYWORD3>replace</KEYWORD3>
  201.             <KEYWORD3>match</KEYWORD3>
  202.             <KEYWORD3>search</KEYWORD3>
  203.             <KEYWORD3>split</KEYWORD3>
  204.             <KEYWORD3>chunk</KEYWORD3>
  205.             <KEYWORD3>list</KEYWORD3>
  206.             <KEYWORD3>hash</KEYWORD3>
  207.             <KEYWORD3>size</KEYWORD3>
  208.  
  209.             <!-- Hash Virtual Methods -->
  210.             <KEYWORD3>keys</KEYWORD3>
  211.             <KEYWORD3>values</KEYWORD3>
  212.             <KEYWORD3>each</KEYWORD3>
  213.             <KEYWORD3>sort</KEYWORD3>
  214.             <KEYWORD3>nsort</KEYWORD3>
  215.             <KEYWORD3>import</KEYWORD3>
  216.             <KEYWORD3>defined</KEYWORD3>
  217.             <KEYWORD3>exists</KEYWORD3>
  218.             <KEYWORD3>item</KEYWORD3>
  219.  
  220.             <!-- List Virtual Methods -->
  221.             <KEYWORD3>first</KEYWORD3>
  222.             <KEYWORD3>last</KEYWORD3>
  223.             <KEYWORD3>max</KEYWORD3>
  224.             <KEYWORD3>reverse</KEYWORD3>
  225.             <KEYWORD3>join</KEYWORD3>
  226.             <KEYWORD3>grep</KEYWORD3>
  227.             <KEYWORD3>unshift</KEYWORD3>
  228.             <KEYWORD3>push</KEYWORD3>
  229.             <KEYWORD3>shift</KEYWORD3>
  230.             <KEYWORD3>pop</KEYWORD3>
  231.             <KEYWORD3>unique</KEYWORD3>
  232.             <KEYWORD3>merge</KEYWORD3>
  233.             <KEYWORD3>slice</KEYWORD3>
  234.             <KEYWORD3>splice</KEYWORD3>
  235.             <KEYWORD3>count</KEYWORD3>
  236.  
  237.             <!-- Standard filters -->
  238.             <FUNCTION>format</FUNCTION>
  239.             <FUNCTION>upper</FUNCTION>
  240.             <FUNCTION>lower</FUNCTION>
  241.             <FUNCTION>ucfirst</FUNCTION>
  242.             <FUNCTION>lcfirst</FUNCTION>
  243.             <FUNCTION>trim</FUNCTION>
  244.             <FUNCTION>collapse</FUNCTION>
  245.             <FUNCTION>html</FUNCTION>
  246.             <FUNCTION>html_entity</FUNCTION>
  247.             <FUNCTION>html_para</FUNCTION>
  248.             <FUNCTION>html_break</FUNCTION>
  249.             <FUNCTION>html_para_break</FUNCTION>
  250.             <FUNCTION>html_line_break</FUNCTION>
  251.             <FUNCTION>uri</FUNCTION>
  252.             <FUNCTION>url</FUNCTION>
  253.             <FUNCTION>indent</FUNCTION>
  254.             <FUNCTION>truncate</FUNCTION>
  255.             <FUNCTION>repeat</FUNCTION>
  256.             <FUNCTION>remove</FUNCTION>
  257.             <FUNCTION>replace</FUNCTION>
  258.             <FUNCTION>redirect</FUNCTION>
  259.             <FUNCTION>eval</FUNCTION>
  260.             <FUNCTION>evaltt</FUNCTION>
  261.             <FUNCTION>perl</FUNCTION>
  262.             <FUNCTION>evalperl</FUNCTION>
  263.             <FUNCTION>stdout</FUNCTION>
  264.             <FUNCTION>stderr</FUNCTION>
  265.             <FUNCTION>null</FUNCTION>
  266.             <FUNCTION>latex</FUNCTION>
  267.         </KEYWORDS>
  268.     </RULES>
  269. </MODE>
  270.